package com.zkq.graduate.service.impl;

import com.zkq.graduate.mapper.RoleMapper;
import com.zkq.graduate.pojo.Role;
import com.zkq.graduate.service.RoleService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author zhangkaiqiang
 * @Date 2019/12/1  14:32
 * @Description TODO
 */
@Service("roleService")
public class RoleServiceImpl implements RoleService {

	@Resource
	private RoleMapper roleMapper;

	@Override
	public List<Role> listAllRole() {
		List<Role> role=roleMapper.listAllRole();
		if(CollectionUtils.isEmpty(role)){
			return new ArrayList<>();
		}
		return role;
	}
}
